package cn.eng.pet.domain;

import java.math.BigDecimal;
import java.util.Date;

import cn.eng.basic.domain.BaseDomain;
import cn.eng.org.domain.Shop;
import cn.eng.user.domain.User;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 实体类：宠物
 */
@Data
public class Pet extends BaseDomain{
    //宠物名称
    private String name;
    //成本价
    private BigDecimal costprice;
    //销售价
    private BigDecimal saleprice;
    //宠物类型id
    private Long typeId;
    private PetType petType; //宠物类型对象
    //宠物图片
    private String resources;
    //状态：0下架 1上架 null表示还没有上过架
    private Integer state;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date offsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date onsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    //创建时间
    private Date createtime;
    //店铺Id,该宠物是哪一个店铺的
    private Long shopId;
    private Shop shop; //店铺对象
    //如果为null，表示该宠物还没有被领养或卖出去，不为null表示领养用户的id
    private Long userId;
    private User user; //领养人对象
    //寻主消息ID，为null表示该宠物来自于店铺饲养，不为null表示该宠物来自于寻主消息
    private Long searchMasterMsgId;

    private PetDetail petDetail;

}
